﻿<%@ Page Language="C#" MasterPageFile="~/GUIMaster.Master" AutoEventWireup="true" CodeBehind="ManageRolesToUsers.aspx.cs" 
Inherits="TripLOA.GUI.roles.RolesToUsers" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHomePage" runat="server">
    <h1>
        <asp:Label ID="IblUsersRolesPageTitle" runat="server" 
            meta:resourcekey="IblUsersRolesPageTitleResource1"></asp:Label>
    &nbsp;</h1>    

    <div id="sec_Div_content">
       
       <asp:Label ID="lab_status" runat="server" Font-Bold="True" 
            CssClass="label_title_sec" meta:resourcekey="lab_statusResource1"></asp:Label>
            <br />
            <br />
              
        <asp:Label ID="label_manage_users" runat="server" 
        Text="MANAGE Users:" CssClass="label_title_sec" 
            meta:resourcekey="label_manage_usersResource1" ></asp:Label>
        <br />
        <br />
        <asp:Label ID="label_tot" runat="server" Text="Total Users: "
        CssClass="label_title_sec" meta:resourcekey="label_totResource1"></asp:Label>
        <asp:Label ID="label_tot_num" runat="server" Text=""
        CssClass="label_title_sec"></asp:Label>
        <br />
        <asp:Label ID="label_online" runat="server" Text="Currently online: "
        CssClass="label_title_sec" meta:resourcekey="label_onlineResource1"></asp:Label>
        <asp:Label ID="label_online_num" runat="server" Text=""
        CssClass="label_title_sec"></asp:Label>
        <br />
        <br />
        
        <asp:Repeater ID="FilteringUI" runat="server" 
            onitemcommand="FilteringUI_ItemCommand">
         <ItemTemplate>
          <asp:LinkButton runat="server" ID="lnkFilter"
               Text='<%# Container.DataItem %>'
               CommandName='<%# Container.DataItem %>' 
                 meta:resourcekey="lnkFilterResource1"></asp:LinkButton>
        </ItemTemplate>
        <SeparatorTemplate>|</SeparatorTemplate>
        </asp:Repeater>
        
        <br />
        <br />
        <asp:GridView ID="ManageUsers" runat="server" AutoGenerateColumns="False" 
            meta:resourcekey="ManageUsersResource1">
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="UserName" 
                    DataNavigateUrlFormatString="UserInformation.aspx?user={0}" Text="Manage" 
                    meta:resourcekey="HyperLinkFieldResource1" />
                <asp:BoundField DataField="Username" HeaderText="Username" 
                    meta:resourcekey="BoundFieldResource1" />
                <asp:BoundField DataField="Email" HeaderText="Email" 
                    meta:resourcekey="BoundFieldResource2" />
                <asp:CheckBoxField DataField="isOnline" HeaderText="Online" 
                    meta:resourcekey="CheckBoxFieldResource1" />
                <asp:CheckBoxField DataField="isLockedOut" HeaderText="Locked" 
                    meta:resourcekey="CheckBoxFieldResource2" />
                <asp:BoundField DataField="LastLoginDate" HeaderText="Last Login" 
                    meta:resourcekey="BoundFieldResource3" />
                </Columns>
        </asp:GridView>
        
     <p>
     <asp:LinkButton ID="lnkFirst" runat="server" OnClick="lnkFirst_Click">&lt;&lt;First</asp:LinkButton> |
     <asp:LinkButton ID="lnkPrev" runat="server" OnClick="lnkPrev_Click">&lt; Prev</asp:LinkButton>|
     <asp:LinkButton ID="lnkNext" runat="server" OnClick="lnkNext_Click">Next &gt;</asp:LinkButton>|
     <asp:LinkButton ID="lnkLast" runat="server" OnClick="lnkLast_Click">Last &gt;&gt;</asp:LinkButton>
     </p>
        <br />
        
        <br />

        
        <asp:Label ID="label_MANAGERoles" runat="server" Text="Administrators" 
            CssClass="label_title_sec" meta:resourcekey="label_MANAGERolesResource1"></asp:Label>
   <br />
   <br />
        <asp:GridView ID="RolesUserList" runat="server" AutoGenerateColumns="False" 
            onrowdeleting="RolesUserList_RowDeleting" 
            meta:resourcekey="RolesUserListResource1">
            <Columns>
                <asp:TemplateField HeaderText="Users" meta:resourcekey="TemplateFieldResource1">
                <ItemTemplate>
                
                    <asp:Label ID="UserNameLabel" runat="server" Text="<%# Container.DataItem %>" 
                        meta:resourcekey="UserNameLabelResource1"></asp:Label>
                
                </ItemTemplate>             
                </asp:TemplateField>
                <asp:CommandField DeleteText="Remove from Role" ShowDeleteButton="True" 
                    meta:resourcekey="CommandFieldResource1" />
            </Columns>
        </asp:GridView>
        
        <br />
        <br />
        
        <asp:Label ID="label_DeleteUser" runat="server" Text="DELETE Users:" 
            CssClass="label_title_sec" meta:resourcekey="label_DeleteUserResource1"></asp:Label>
        <br />
        <br />
        <asp:Label ID="lbl_userName_comment" runat="server" 
            Text="Enter a valid username:" meta:resourcekey="lbl_userName_commentResource1"></asp:Label>
            <asp:TextBox ID="txt_deleteuser" runat="server" CssClass="txtBox_generics" 
            meta:resourcekey="txt_deleteuserResource1"></asp:TextBox>
            
                        <asp:Button ID="but_deleteuser" runat="server" onclick="but_deleteuser_Click" 
                            Text="Delete User"  CssClass="button_generics" 
            meta:resourcekey="but_deleteuserResource1"/>
        
        <br />
        <br />
        
        <asp:HyperLink ID="label_go_to_MRoles" runat="server" 
            NavigateUrl="ManageRoles.aspx" Text="Roles Management Page" 
            meta:resourcekey="label_go_to_MRolesResource1"></asp:HyperLink>
       
    </div>
</asp:Content>
